<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            box-sizing: border-box;
        }

        @media screen and (min-width: 960px) {
            .box {
                border: 1px solid #833;
                color: #833;
                background-color: blue;
                padding: 10px;
                width: 25%;
            }
        }

        @media screen and (min-width: 480px) and (max-width:960px) {
            .box {
                border: 1px solid #833;
                color: #833;
                background-color: blue;
                padding: 10px;
                width: 50%;
            }
        }

        @media screen and (max-width: 480px) {
            .box {
                border: 1px solid #833;
                color: #833;
                background-color: blue;
                padding: 10px;
                width: 100%;
                margin: auto;
            }
        }
        /*.container {
            padding-right: 15px;
            padding-left: 15px;
            margin-right: auto;
            margin-left: auto;
        }*/

        .col {
            position: relative;
            float: left;
            height: 100px;
            margin-top: 10px;
            margin-bottom: -10px;
            padding-left: 15px;
            padding-right: 15px;
            
        }
    </style>
</head>

<body>
        <div>
            <div class="col box ">内容块1</div>
            <div class="col box">内容块2</div>
            <div class="col box">内容块3</div>
            <div class="col box">内容块4</div>
        </div>
</body>

</html>